LoRa technology was developed over 10 years ago, with many communication protocols optimized for LoRaWAN. However, in the protocols, all data from the end devices are sent directly or forwarded through a gateway to the LoRaWAN server and processed centrally there. Accordingly, the gateway only acts as a forwarder. This mechanism increases the processing load on the server, increases latency, and is not suitable for applications with a large number of end devices or that require real-time applications. In this paper, we design and develop a new LoRa communication protocol that supports edge computing at the gateway. At the same time, the authors design and manufacture a Smart Multiplatform IoT Gateway (SMGW) and LoRa nodes that allow the implementation and evaluation of the proposed protocol in practice. The test results on a system of 50 LoRa nodes and the SMGW show that the proposed protocol works well when evaluating its performance in terms of reliability, latency, and power consumption. This proposed system is suitable for applications that require edge computing and is easily extendable to other IoT applications.